package org.serverct.finalfight.game.uhc.team;

import org.bukkit.Bukkit;

import java.util.*;

public class Team {
    public TeamType type;
    public HashMap<UUID,TeamPlayer> players;
    public Team(TeamType type, TeamPlayer... all){
        this.type=type;
        players=new HashMap<>();
        for(TeamPlayer player:all){
            players.put(player.uuid,player);
        }
    }
    public void addPlayer(TeamPlayer player){
        this.players.put(player.uuid,player);
    }
    public int getAmount(){
        return players.size();
    }
    public List<String> getMates(){
        List<String> mates=new ArrayList<>();
        for(UUID uuid:players.keySet())
            mates.add(Bukkit.getPlayer(uuid).getName());
        return mates;
    }
}
